
const userreducer = (state = [], action) => {

    switch (action.type) {
        case 'GET_USER':
            console.log(action.userlist)
            return action.userlist
        case 'DEL_USER':
            let arr
            arr = [...state].filter((item) => {
                return item.user_id != action.index
            })
            return arr
        default:
            return state;
    }
}

export default userreducer;